High Efficiency Video Coding (HEVC) is a video coding standard being developed to provide improved video compression when compared to previous standards such as H.264/MPEG-4 Advanced Video Coding (AVC), in order to better handle the large amounts of data present in high resolution video files. HEVC is a block-based hybrid spatial and temporal predictive coding scheme in which an input image, such as a video frame, is divided into square blocks called coding tree units (CTUs). Unlike many other video coding schemes that break input images into macroblocks of 16×16 pixels, each CTU in HEVC can be as large as 64×64 pixels. Each CTU can then be recursively divided into one or more levels of smaller square blocks called Coding Units (CUs) that are coded.
In HEVC, prediction units (PUs) within each individual CU can be coded with intra prediction or inter prediction. Coding a PU with intra prediction uses spatial prediction, in which a predicted PU is predicted from a spatial prediction direction based on neighboring pixels around the PU being coded, and the spatial prediction direction is coded in syntax. Coding with inter prediction uses temporal prediction, in which predicted PU motion compensation blocks that are similar to the PU being coded are found in other image slices within the same or different input images. Motion vectors are coded in syntax that point to predicted PU motion compensation blocks in other image slices, along with an index identifying reference pictures in which the other image slices appear.
In some embodiments or extensions of HEVC algorithms, a technique called intra block copy (IBC) can be alternately used when coding an input image. Coding a CU using intra block copy can be done by finding an intra block copy compensation block that is similar to the CU being coded within the same image slice as the CU being coded. A intra block copy vector can be coded in syntax that points to the intra block copy compensation block. As such, intra block copy vectors and intra block copy compensation blocks for a CU can be similar to the motion vectors that point to motion compensation blocks used when coding PUs with inter prediction, expect that the intra block copy compensation blocks are within the same slice as the CU being coded.
Intra block copy offer improved compression in many situations when compared to only using intra prediction and inter prediction. For example, because an individual slice often contains repeated patterns, an intra block compensation block found at another position in the same slice can often be more similar to the CU being coded than predicted PUs generated through spatial prediction.
However, an even closer match for a CU than the one found through intra block copy can often be found in another slice using the temporal prediction of inter prediction. For example, when coding a video sequence showing a ball moving from the top left corner of the screen to the lower right corner of the screen, coding the CU showing a portion of the ball can be more efficiently coded by referring to areas of previous or subsequent images that show the same portion of the ball rather than coding another portion of the same slice that may not show the ball. As such, intra block copy is often irrelevant when coding CUs within inter slices.
Most existing HEVC coding systems add an intra block copy flag to each and every CU when coding with intra block copy. This intra block copy flag indicates whether or not intra block copy was used when coding the CU. However, because intra block copy is often irrelevant when coding CUs within inter slices, having an encoder add an intra block copy flag to every CU, even ones for which the intra block copy information is generally irrelevant, the addition of the intra block copy flag adds an unnecessary bit to the bitstream, and also wastes time and processor cycles. It also wastes time and processor cycles for a decoding system, because the decoding system checks each CU for the value of its intra block copy flag, even when the information provided by the intra block copy flag is likely not relevant for CUs in inter slices.